package softdone;

import java.sql.CallableStatement;

public class Admin_done {
	int I=0;
	public int Che_Login(String Name,String Pwd){
	String sql="{ call admin_login(?,?,?) }";
	try{
		Conn Dataconn=new Conn();
		Dataconn.Create();
		CallableStatement cs=Dataconn.CSt_SQL(sql);
		cs.setString(1, Name); 
		cs.setString(2, Pwd); 
		cs.registerOutParameter(3,java.sql.Types.INTEGER);
		cs.execute(); 
		I=cs.getInt(3);
		Dataconn.CloseCC();
		}catch(Exception e){
			e.printStackTrace();
	}
	return I;
	}
}
